.class public Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;
.super Lcom/waiqin365/lightapp/base/WqBaseActivity;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/widget/ListView;

.field private c:Lcom/waiqin365/lightapp/view/SearchView;

.field private d:Ljava/util/ArrayList;

.field private e:Lcom/waiqin365/lightwork/directory/b/n;

.field private f:Lcom/waiqin365/lightapp/view/NoNetView;

.field private g:Z


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lcom/waiqin365/lightapp/base/WqBaseActivity;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->g:Z

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;)Landroid/widget/ListView;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b:Landroid/widget/ListView;

    return-object v0
.end method

.method static synthetic a(Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->a(Ljava/lang/String;)V

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 4

    const/4 v3, 0x0

    sget-boolean v0, Lcom/waiqin365/lightwork/directory/DirectoryActivity;->c:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->e:Lcom/waiqin365/lightwork/directory/b/n;

    invoke-virtual {v0, p1}, Lcom/waiqin365/lightwork/directory/b/n;->a(Ljava/lang/String;)V

    invoke-static {p1}, Lcom/fiberhome/gaea/client/d/g;->c(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->g:Z

    iget-boolean v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->g:Z

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    invoke-direct {p0, p1}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->c(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->e:Lcom/waiqin365/lightwork/directory/b/n;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightwork/directory/b/n;->a(Z)V

    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->e:Lcom/waiqin365/lightwork/directory/b/n;

    invoke-virtual {v0}, Lcom/waiqin365/lightwork/directory/b/n;->notifyDataSetChanged()V

    invoke-direct {p0, p1}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b(Ljava/lang/String;)V

    :cond_1
    return-void

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    invoke-static {p0}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v1

    sget-object v2, Lcom/waiqin365/base/db/offlinedata/q;->b:Lcom/waiqin365/base/db/offlinedata/q;

    invoke-virtual {v1, v2, v3, p1}, Lcom/waiqin365/base/db/offlinedata/m;->a(Lcom/waiqin365/base/db/offlinedata/q;ZLjava/lang/String;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->e:Lcom/waiqin365/lightwork/directory/b/n;

    invoke-virtual {v0, v3}, Lcom/waiqin365/lightwork/directory/b/n;->a(Z)V

    goto :goto_0
.end method

.method static synthetic b(Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->a:Landroid/content/Context;

    return-object v0
.end method

.method private b(Ljava/lang/String;)V
    .locals 4

    const/16 v1, 0x8

    const/4 v3, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-gtz v0, :cond_0

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->f:Lcom/waiqin365/lightapp/view/NoNetView;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/NoNetView;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b:Landroid/widget/ListView;

    invoke-virtual {v0, v3}, Landroid/widget/ListView;->setVisibility(I)V

    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b:Landroid/widget/ListView;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->f:Lcom/waiqin365/lightapp/view/NoNetView;

    invoke-virtual {v0, v3}, Lcom/waiqin365/lightapp/view/NoNetView;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->f:Lcom/waiqin365/lightapp/view/NoNetView;

    const v1, 0x7f0805a1

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    aput-object p1, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v2, "#ff9908"

    invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v2

    invoke-static {v1, p1, v2}, Lcom/waiqin365/lightapp/dailyreport/util/a;->a(Ljava/lang/CharSequence;Ljava/lang/CharSequence;I)Landroid/text/SpannableStringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Landroid/text/SpannableStringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/NoNetView;->b(Ljava/lang/String;)V

    goto :goto_0
.end method

.method static synthetic c(Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;)Ljava/util/ArrayList;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    return-object v0
.end method

.method private c(Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 4

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    sget-object v0, Lcom/waiqin365/lightwork/directory/DirectoryActivity;->b:Ljava/util/ArrayList;

    if-eqz v0, :cond_1

    sget-object v0, Lcom/waiqin365/lightwork/directory/DirectoryActivity;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v3

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    if-ge v1, v3, :cond_1

    sget-object v0, Lcom/waiqin365/lightwork/directory/DirectoryActivity;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->d:Ljava/lang/String;

    invoke-virtual {v0, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    sget-object v0, Lcom/waiqin365/lightwork/directory/DirectoryActivity;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_0
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_1
    return-object v2
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onCreate(Landroid/os/Bundle;)V

    iput-object p0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->a:Landroid/content/Context;

    invoke-static {p0}, Lcom/fiberhome/gaea/client/d/a;->b(Landroid/app/Activity;)V

    const v0, 0x7f030122

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->setContentView(I)V

    const v0, 0x7f0c00cb

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/view/NoNetView;

    iput-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->f:Lcom/waiqin365/lightapp/view/NoNetView;

    const v0, 0x7f0c0539

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b:Landroid/widget/ListView;

    const v0, 0x7f0c0131

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/view/SearchView;

    iput-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->c:Lcom/waiqin365/lightapp/view/SearchView;

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->c:Lcom/waiqin365/lightapp/view/SearchView;

    const v1, 0x7f080274

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/SearchView;->setHint(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->c:Lcom/waiqin365/lightapp/view/SearchView;

    new-instance v1, Lcom/waiqin365/lightwork/directory/a;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightwork/directory/a;-><init>(Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/SearchView;->setOnSearchKeyChangedListener(Lcom/waiqin365/lightapp/view/hl;)V

    new-instance v0, Lcom/waiqin365/lightwork/directory/b/n;

    iget-object v1, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->a:Landroid/content/Context;

    iget-object v2, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->d:Ljava/util/ArrayList;

    invoke-direct {v0, v1, v2}, Lcom/waiqin365/lightwork/directory/b/n;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    iput-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->e:Lcom/waiqin365/lightwork/directory/b/n;

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->e:Lcom/waiqin365/lightwork/directory/b/n;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    iget-object v0, p0, Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;->b:Landroid/widget/ListView;

    new-instance v1, Lcom/waiqin365/lightwork/directory/b;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightwork/directory/b;-><init>(Lcom/waiqin365/lightwork/directory/DirectorSearchActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    return-void
.end method
